package com.osfw.activiti.service.running;


import com.baomidou.mybatisplus.extension.service.IService;
import com.osfw.activiti.domain.ProcessApproval;
import com.osfw.activiti.domain.ProcessExecResult;
import com.osfw.activiti.domain.ProcessNodeInfo;
import com.osfw.activiti.entity.history.ActHiProcinst;
import com.osfw.activiti.entity.running.ActRuExec;
import com.osfw.system.entity.manage.SysUser;

import java.util.Date;
import java.util.List;

/**
 * 流程节点信息表 服务层
 */
public interface IActRuExecService extends IService<ActRuExec> {

    /**
     * 初始化流程执行实例数据
     *
     * @param procinst  流程实例信息
     * @param startNode 开始节点
     * @param startTime 开始时间
     * @param startUser 发起人
     * @param nextNode  下个节点
     */
    ProcessExecResult init(ActHiProcinst procinst, ProcessNodeInfo startNode, Date startTime, SysUser startUser, ProcessNodeInfo nextNode);


    ProcessExecResult agree(ProcessApproval approval, SysUser sysUser, Date currentTime);


    ProcessExecResult goback(ProcessApproval approval, SysUser sysUser, Date currentTime);


    ProcessExecResult disagree(ProcessApproval approval, SysUser sysUser, Date currentTime);


}
